<xsl:variable name="cijfer">t2</xsl:variable>
<xsl:variable name="periode">periode 2</xsl:variable>
<xsl:template match='/'>  
<html>
<head> 
  <style>     
 			BODY{font-family: Verdana,Arial, Helvetica;
      		font-weight: normal;
         	font-size: 10pt;
        	line-height:12pt}
     	TD{font-family: Verdana,Arial, Helvetica;
        	font-weight: normal;
        	font-size: 10pt;
        	line-height:12pt;
        	text-align:center}
     TH{font-family:Verdana,Arial, Helvetica;
        	font-weight: bold;
        	font-size: 10pt;
        	line-height:12pt;
        	text-align:center}
    .lln {font-family: Verdana,Arial, Helvetica;
        	font-weight: bold;
        	font-size: 10pt;
        	line-height:12pt;
        	text-align:left}       	
    TABLE{border-collapse: collapse;
        	margin-top:0.1cm}
.blokL{ font-family: Verdana,Arial, Helvetica;
   	font-size: 10px;
	font-weight: normal;
	margin:0px;	
	text-align:left;
	width:22px}

.blokR{ font-family: Verdana,Arial, Helvetica;
   	font-size: 10px;
	font-weight: normal;
	margin:0px;
	text-align: right;
	width:22px}

.blok{ font-family: Verdana,Arial, Helvetica;
   	font-size: 12px;
	font-weight: normal;
	margin:0px;	
	width:46px}        	
        
   </style>  
</head>
  
<body>
<table border='1'>
<tr width="90%"><th colspan='10'>Overzicht semestercommentaar <xsl:value-of select="$periode" /></th></tr>
	<xsl:apply-templates select='//rapport'  />
</table>	  
</body>	   
</html>
</xsl:template>

<xsl:template match='rapport'>
  <xsl:if test="commentaar//klasleraar[@periode=$cijfer]">
  <table width="90%" border="1" cellpadding="2">
  <tr><th width="100%" colspan="2" class="titel"><xsl:value-of select="leerling/voornaam" />&#32;<xsl:value-of select="leerling/achternaam" /> </th></tr>
  <xsl:for-each select="commentaar/*"><xsl:call-template name="commentaar" /></xsl:for-each>
  </table>
  </xsl:if>
</xsl:template> 

<xsl:template name="commentaar">
<xsl:if test="klasleraar/@periode=$cijfer">
<tr>
  <th width="5mm" class="titel"> <xsl:value-of select="name()" />  </th>
  <td> <xsl:apply-templates select="klasleraar[@periode=$cijfer]" /> </td>
</tr>  
</xsl:if>
</xsl:template>

<xsl:template match="klasleraar">
  <xsl:value-of select="." />
</xsl:template>  
